home *** CD-ROM | disk | FTP | other *** search
/ PC Home 48 / Fun Clicp Art 5000.iso / r / mbm / 00888_TH-bt coins.ls < prev    next >
Encoding:
Text File  |  1996-05-11  |  2.3 KB  |  100 lines

  1. on mouseDown
  2.   global g1erSprLoc, gPage, gNumSpr, gMaxBoutons
  3.   curseur(2)
  4.   set gNumSpr to -2
  5.   if gPage = 0 then
  6.     set fin to gMaxBoutons
  7.   else
  8.     set fin to g1erSprLoc + 2
  9.   end if
  10.   repeat with i = g1erSprLoc to fin
  11.     if rollOver(i) then
  12.       set gNumSpr to i
  13.       exit repeat
  14.     end if
  15.   end repeat
  16. end
  17.  
  18. on mouseUp
  19.   global g1erSprLoc, gPage, gNumSpr, gMaxBoutons, gSurvolPrec
  20.   curseur(1)
  21.   set monNumSpr to -2
  22.   if gPage = 0 then
  23.     set fin to gMaxBoutons
  24.   else
  25.     set fin to g1erSprLoc + 2
  26.   end if
  27.   repeat with i = g1erSprLoc to fin
  28.     if rollOver(i) then
  29.       set monNumSpr to i
  30.       exit repeat
  31.     end if
  32.   end repeat
  33.   if (monNumSpr = gNumSpr) and (monNumSpr > 0) then
  34.     if (gNumSpr = 25) or (gNumSpr = 21) then
  35.       MouseClick(gNumSpr - g1erSprLoc)
  36.     else
  37.       beep()
  38.       set gSurvolPrec to -1
  39.     end if
  40.   else
  41.     pass()
  42.   end if
  43. end
  44.  
  45. on MouseClick monSpr
  46.   global gCDpath, gPage, gMaxBoutons, g1erSprLoc, gLocLabel, gSensTrans, gVersion
  47.   curseur(6)
  48.   if monSpr = 0 then
  49.     set gPage to 0
  50.   else
  51.     if monSpr = 1 then
  52.       set gPage to gPage - 1
  53.     else
  54.       if monSpr = 2 then
  55.         set gPage to gPage + 1
  56.       else
  57.         set gPage to monSpr - 2
  58.       end if
  59.     end if
  60.   end if
  61.   if gPage >= 0 then
  62.     set the fileName of cast "FICHE TH2" to gVersion & "PT" & gPage & ".PIC"
  63.     if gPage = 0 then
  64.       set the visible of sprite g1erSprLoc to 0
  65.       set the visible of sprite (g1erSprLoc + 1) to 0
  66.       repeat with i = g1erSprLoc + 2 to gMaxBoutons
  67.         set the visible of sprite i to 1
  68.       end repeat
  69.     else
  70.       if gPage <= 14 then
  71.         if gPage < 14 then
  72.           set the visible of sprite (g1erSprLoc + 2) to 1
  73.         else
  74.           set the visible of sprite (g1erSprLoc + 2) to 0
  75.         end if
  76.         set the visible of sprite g1erSprLoc to 1
  77.         set the visible of sprite (g1erSprLoc + 1) to 1
  78.         if gPage <> 14 then
  79.           set the visible of sprite (g1erSprLoc + 2) to 1
  80.         else
  81.           set the visible of sprite (g1erSprLoc + 2) to 0
  82.         end if
  83.         repeat with i = g1erSprLoc + 3 to gMaxBoutons
  84.           set the visible of sprite i to 0
  85.         end repeat
  86.       else
  87.         set gPage to 14
  88.       end if
  89.     end if
  90.   else
  91.     set gPage to 0
  92.   end if
  93.   if monSpr < 2 then
  94.     set gSensTrans to 1
  95.   else
  96.     set gSensTrans to 2
  97.   end if
  98.   set gLocLabel to "TH:RN2"
  99. end
  100.